#pragma once

#include <QSequentialAnimationGroup>
#include "gamescene.h"
#include "planet.h"
#include <boost/enable_shared_from_this.hpp>

class Ships : public QSequentialAnimationGroup, public boost::enable_shared_from_this<Ships>
{
   Q_OBJECT

public:
   // inPercent - if true ships will be calculated in percents, otherwise in absolute value
   // 
   Ships(const GameScenePtr gameScene, const GroupID id, const PlanetPtr sourcePlanet, const PlanetPtr destinationPlanet, 
         const PlayerID playerID, const unsigned int percentToSend, bool inPercent, bool notifyOnArrival, 
         QObject *parent = NULL);
   ~Ships();
private:
   void disconnectSignals();
   const GroupID m_id;
   const GameScenePtr m_gameScene;
   const PlanetPtr m_sourcePlanet;
   const PlanetPtr m_destinationPlanet;
   const PlayerID m_playerID;
   const unsigned m_percentToSend;
   boost::shared_ptr<Ship> m_ship;
   boost::shared_ptr<QPropertyAnimation> m_propertyAnimation;
   boost::shared_ptr<QGraphicsItemGroup> m_group;
};